package com.ithk.hospital.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ithk.hospital.pojo.Patient;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


public interface PatientMapper extends BaseMapper<Patient> {
    /**
     * 统计患者男女人数
     */
    Integer patientAge(@Param("startAge") int startAge, @Param("endAge") int endAge);
    /**
     * 统计患者挂号次数
     * @return
     */
    @MapKey("pId")
    List<Map<String, Object>> countPatientOrders();

}
